#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QThread>
#include <QImage>
#include <QtNetwork/QTcpSocket>

class MyThread : public QThread
{
    Q_OBJECT

public:
    MyThread(QObject *parent = 0);

    void setHostAddress(QString,int,QString);
    void stopCapture();

protected:
    void run();

signals:
    void errorState(QString);
    void curImgChanged(QImage);

private:
    QImage  curImg;

    QString ip;
    QString addr;
    int     port;

    bool    stopFlag;
};

#endif
